//package com.freesky.provider.content.controller;
//
//import com.freesky.common.enums.PanelPositionEnum;
//import com.freesky.common.pojo.ZTreeNode;
//import com.freesky.common.utils.reponse.JSONResponse;
//import com.freesky.common.utils.reponse.JSONResponseDiretor;
//import com.freesky.common.dao.entity.Panel;
//import com.freesky.provider.content.service.PanelService;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.*;
//
//import java.util.List;
//
///**
// * @author: 陈玉林
// * @modifiedBy:
// * @date: Create In 11:29 2018/11/29
// * @description:
// */
//@RestController
//public class PanelController {
//
//    @Autowired
//    private PanelService panelService;
//
//    @RequestMapping(value = "/panel/index/list",method = RequestMethod.GET)
//    public List<ZTreeNode> getIndexPanel(){
//        List<ZTreeNode> list=panelService.getPanelList(PanelPositionEnum.HOME_PAGE.getValue(),false);
//        return list;
//    }
//
//    @RequestMapping(value = "/panel/indexAll/list",method = RequestMethod.GET)
//    public List<ZTreeNode> getAllIndexPanel(){
//
//        List<ZTreeNode> list=panelService.getPanelList(PanelPositionEnum.HOME_PAGE.getValue(),true);
//        return list;
//    }
//
//    @RequestMapping(value = "/panel/indexBanner/list",method = RequestMethod.GET)
//    public List<ZTreeNode> getIndexBannerPanel(){
//
//        List<ZTreeNode> list=panelService.getPanelList(PanelPositionEnum.NONE.getValue(),true);
//        return list;
//    }
//
//    @RequestMapping(value = "/panel/other/list",method = RequestMethod.GET)
//    public List<ZTreeNode> getRecommendPanel(){
//
//        List<ZTreeNode> list=panelService.getPanelList(PanelPositionEnum.ITEM_RECOMMEND.getValue(),false);
//        list.addAll(panelService.getPanelList(PanelPositionEnum.DONATION.getValue(),false));
//        return list;
//    }
//
//    @RequestMapping(value = "/panel/add",method = RequestMethod.POST)
//    public JSONResponse addContentCategory(@RequestBody Panel panel){
//
//        JSONResponse jsonResponse = panelService.addPanel(panel);
//        return jsonResponse;
//    }
//
//    @RequestMapping(value = "/panel/update",method = RequestMethod.POST)
//    public JSONResponse updateContentCategory(@RequestBody Panel panel){
//
//        return panelService.updatePanel(panel);
//    }
//
//    @RequestMapping(value = "/panel/del/{ids}",method = RequestMethod.DELETE)
//    public JSONResponse deleteContentCategory(@PathVariable("ids") int[] ids){
//
//        for(int id:ids){
//            panelService.deletePanel(id);
//        }
//        return JSONResponseDiretor.buildSuccessJSONResponse(null);
//    }
//}
